home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 006a / max_scpt.zip / MAXIMUS.SLT < prev   
Text File  |  1993-05-04  |  6KB  |  173 lines

  1.  
  2. //////////////////////////////////////////////////////////////////////
  3. // This is a Telix script for Maximus boards. It will logon and
  4. // then take you into the Quick Reader, Upload your .REP reply
  5. // file and then delete it, and then "cycle" to the next Select:
  6. // prompt and Download your QWK packet file.
  7. //
  8. // When the script sees the "Updating last read pointers"
  9. // message at the end of downloading it will stop and return
  10. // Telix to manual operation.
  11. //
  12. // If no REP file is found, the script will instead Download
  13. // your QWK packet.
  14. //
  15. // Note:
  16. // If there are no messages available to download after scanning ...
  17. // you'll have to hit Esc to turn off the script. Most Sysops don't
  18. // have Maximus produce a "no messages to download" message.
  19. // -------------------------------------------------------------
  20. //
  21. // Only 2 types of entries are required in this script file ... 
  22. // name & REP file location/name. Be sure there is a Semicolon 
  23. // at the end of the name & REP statement too. Load this file
  24. // into your word processor or editor, do the name and REP
  25. // file location/name entries and save this file. Make sure you
  26. // save it in ASCII (standard text) format.
  27. //
  28. // Type your name in between the str name[] =  qoutes. (line 57)
  29. //                               ^^^^^^^^^^^^
  30. // Type in the drive/dir/xxxxxxxx.rep in between the   (line 58)
  31. // str file_name[] =  qoutes.
  32. // ^^^^^^^^^^^^^^^^^
  33. //
  34. // Note:
  35. // You may also have to change the Q character inside the qoutes
  36. // of the   cputs("Q");  statement ( line 134 ) to match the one
  37. // required for the Reader selection via the Main menu.
  38. //
  39. //
  40. // Next, the script must then be compiled with the Telix CS.EXE
  41. // compiler to be used with Telix AND the name of the compiled .SLC
  42. // file inserted in the "Linked script" entry in the phone book.
  43. //
  44. // Your password must also be inserted in the "Password" entry in
  45. // the phone book as well.
  46. //
  47. // To compile the script ... type    CS xxxxxxxx.SLT  where "x" is
  48. // the name of the script file. Both files must be in the same
  49. // disk location. The original script file is usually renamed
  50. // before compiling to resemble the BBS name.
  51. //
  52. //
  53. // Copy the newly compiled  .SLC  file to the Telix location.
  54. //
  55. ///////////////////////////////////////////////////////////////////////
  56.  
  57. str name[] = "xxxxx xxxx";
  58. str file_name[] = "xxxxxxxxxxxxxxxxxxxxx";
  59.  
  60. ///////////////////////////////////////////////////////////////////////
  61.  
  62. main()
  63.  
  64. {
  65.  int stat;                              // initiate track var
  66.  int t1,                                // initiate individual
  67.      t2,                                // track variables
  68.      t3,
  69.      t4,
  70.      t5,
  71.      t6,
  72.      t7,
  73.      t8;
  74.  
  75. ///////////////////////////////////////////////////////////////////////
  76.  
  77.  alarm (2);                             // sound a connect
  78.                                         // alarm, 2 secs
  79.  
  80. // definitions of what strings to track. 0 is case sensitive on. 1 is off.
  81.  
  82.  t1 = track ("name", 1);
  83.  t2 = track (name, 1);
  84.  t3 = track ("Password", 1);
  85.  t4 = track ("check", 0);
  86.  t5 = track ("character", 0);
  87.  t6 = track ("Select", 0);
  88.  t7 = track ("in QWK format", 0);
  89.  t8 = track ("lastread pointers", 0);
  90.  
  91. ///////////////////////////////////////////////////////////////////////
  92.  
  93.  while (1)
  94.  {
  95.    terminal();                          // let Telix process any
  96.                                         // chars and keys
  97.  
  98.    stat = track_hit(0);                 // see which (if any) track
  99.                                         // was hit
  100.  
  101. ///////////////////////////////////////////////////////////////////////
  102.  
  103.    if (stat == t1)                      // Name
  104.     {
  105.      delay(10);                         // wait 1 second
  106.      cputs(name);                       // send defined string
  107.      cputc('^M');                       // send Carriage Return
  108.      track_free(t1);                    // free track handle (turn off)
  109.     }
  110.    else if(stat == t2)                  // Verify name
  111.     {
  112.      delay(10);
  113.      cputs("Y");
  114.      cputc('^M');
  115.      track_free(t2);
  116.     }
  117.    else if(stat == t3)                  // Send password
  118.     {
  119.      delay(10);
  120.      cputs(_entry_pass);
  121.      cputc('^M');
  122.      track_free(t3);
  123.     }
  124.    else if(stat == t4)                  // "check" for messages
  125.     {                                   // addressed to you?
  126.      delay(10);
  127.      cputs("N");
  128.      cputc('^M');
  129.      track_free(t4);
  130.     }
  131.    else if(stat == t5)              // Quick Reader selection (Via Main menu)
  132.     {                                   // enter the first "character"
  133.      delay(10);                         // of the command you wish ...
  134.      cputs("Q");
  135.      cputc('^M');
  136.      track_free(t5);
  137.     }
  138.    else if(stat == t6)                  // Check for .REP packet file &
  139.     {                                   // upload OR if not avail, download
  140.     delay(10);                          // QWK packet file via Quick Reader
  141.     if(filefind(file_name, 0))          // "Select" prompt
  142.     {
  143.     delay(10);
  144.     cputs("U");
  145.     cputc('^M');
  146.     send('Z', file_name);
  147.     delay(10);
  148.     fdelete(file_name);
  149.     }
  150.    else
  151.     {
  152.     delay(10);
  153.     cputs("D");                         // Download QWK packet via "Select"
  154.     cputc('^M');                        // prompt
  155.     track_free(t6);
  156.      }
  157.      }
  158.    else if(stat == t7)                  // Download msgs "in QWK format"
  159.     {
  160.      delay(10);
  161.      cputs("Y");
  162.      cputc('^M');
  163.      track_free(t7);
  164.      }
  165.    else if(stat == t8)                  // Updating "lastread pointers"...
  166.     {                                   // message.
  167.      delay(10);
  168.      break;                             // done with script.
  169.     }
  170.     }
  171.     }
  172.  
  173.